'''
Created on Nov 11, 2012

@author: aartyomenko
'''

class out(object):
    '''
    Static class for simplifying output
    '''
    def __init__(self, out):
        '''
        Constructor for object. Init output stream 
        '''
        self.out = out
    
    def write(self, message):
        '''
        Outputs message to the out stream (stdout is default) 
        '''
        if not self.out: print message
        else: out.write('{0}\n'.format(message))